#ifndef ASGKA_BASE_H
#define ASGKA_BASE_H

#include "singleGroup.h"
#include "asgka_common.h"
#include "Uncopyable.h"

class asgkaBase : private Uncopyable
{
public:
	asgkaBase();
	asgkaBase(singleGroup *m_group);
	virtual ~asgkaBase();

	void correlateAGroup(singleGroup *group);
	void generateAgreementKey();
	void computeAgreedKey();

	void publicCiphertexts();
	void updateElementsofGroup() const;

	c_asgka_element getAgreedKey() const;

	virtual void computeMyDecryptKey() = 0;

protected:
	virtual void computeMyGroupKeyR() = 0;
	virtual void computeMyGroupKeyA() = 0;

protected:
	singleGroup *m_group;
	asgka_element m_my_plaintext;
	asgka_element m_my_decrypt_key;
	asgka_element m_my_groupKeyR;
	asgka_element m_my_groupKeyA;
};

#endif // ASGKA_BASE_H

